//
//  MVContents.m
//  __PRODUCTNAME__
//
//  Created by QC.L on 16/08/15
//  Copyright (c) __ORGANIZATIONNAME__. All rights reserved.
//

#import "MVContents.h"
#import "MVTableList.h"

@implementation MVContents

+ (NSDictionary *)objectClassInArray{
    return @{@"list" : [MVTableList class]};
}

- (void)setValue:(id)value forKey:(NSString *)key {
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"list"]) {
        NSMutableArray *array = [NSMutableArray array];
        for (NSDictionary *dictionary in value) {
            MVTableList *list = [MVTableList modelWithDictionary:dictionary];
            [array addObject:list];
        }
        _list = array;
    }
}

@end
